package cn.powertime.evaluation.exception;

/**
 * 业务统一抛出的异常
 * @author ZYW
 */
public class BusinessException extends RuntimeException {

    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public BusinessException() {
        this.code = 0;
        this.msg = "";
    }

    public BusinessException(String message) {
        super(message);
        this.msg = message;
        this.code = 0;
    }

    public BusinessException(Integer code,String message) {
        super(message);
        this.msg = message;
        this.code = code;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(String message,Integer code, Throwable cause) {
        super(message, cause);
        this.msg = message;
        this.code = code;
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(Throwable cause,Integer code,String message) {
        super(cause);
        this.code = code;
        this.msg = message;
    }
}
